#ifndef STU_INTERFACE_H
#define STU_INTERFACE_H

#include <QDialog>
#include <vector>
#include "bookstore.h"
#include "student.h"
#include "menutobooks.h"
#include "changecode.h"
#include "add_message.h"
#include "show_messagelist.h"

using namespace student;
using namespace bookandrecord;
using namespace bookstore;

namespace Ui {
class stu_interface;
}

class stu_interface : public QDialog {
    Q_OBJECT

  public:
    explicit stu_interface(QWidget *parent = nullptr);
    ~stu_interface();

  private slots:
    void on_pushButton_2_clicked();
    void showSingleMenu(Menu *menu);
    void showMenu(vector<Menu*> menu, int numofpage);

    void on_pushButton_7_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_clicked();

    void on_pushButton_5_clicked();
    void clear3();
    void showstar();
    void show31();
    void show32();
    void show33();

    void on_pushButton_16_clicked();

    void on_pushButton_17_clicked();

    void on_pushButton_18_clicked();

    void on_pushButton_19_clicked();

    void on_pushButton_20_clicked();

    void on_pushButton_21_clicked();

    void on_pushButton_22_clicked();
    void on_pushButton_23_clicked();
    void on_pushButton_24_clicked();

    void F5_Star();

    void clear1();

    void showpage();

    void show1();

    void show2();

    void show3();

    void getData(Student*, int);
    void on_pushButton_6_clicked();

    void on_pushButton_10_clicked();
    void clear2();
    void show21();
    void show22();
    void show23();
    void showRecord();
    char* find1(int, char*);
    char* find2(int, char*);
    bool cmp(int x,int y);
    void on_pushButton_15_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_11_clicked();

    void on_pushButton_13_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_12_clicked();

    void on_pushButton_14_clicked();

    void F5_Record();

    void clear4();
    void show41();
    void show42();
    void show43();
    void showReserve();
    void F5_Reserve();

    void on_pushButton_86_clicked();

    void on_pushButton_87_clicked();

    void on_pushButton_88_clicked();

    void on_pushButton_89_clicked();

    void sortReserve();

  signals:
    void sendData(Menu*, Student*);
    void sendData(Student*);
    void sendData(Student*,int);

  private:
    Ui::stu_interface *ui;
    int page;
    int pagesize;
    int page_size;
    vector<Menu*> menuList;
    Student* stu;
    MenuToBooks* MenuToBookUI;
    vector<Record*> recordList;
    changeCode* changeUI;
    add_Message* addMessageUI;
    show_messageList* messageListUI;

};

#endif // STU_INTERFACE_H
